import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-09-24
 * 14:57
 */
public class Solution {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextLine()) { // 注意 while 处理多个 case
            String s=in.nextLine();
            StringBuffer s1=new StringBuffer();
            char c=s.charAt(0);
            if(isBig(c)){
                s1.append(c);
            }
            for(int i=0;i<s.length();i++){
                char c1=s.charAt(i);
                if(c1==' '){
                    char c2=s.charAt(i+1);
                    if(isBig(c2)){
                        s1.append(c2);
                        continue;
                    }
                    char c3= (char) (c2-32);
                    s1.append(c3);
                }
            }

            System.out.println(s1.toString());
        }
    }
    public static Boolean  isBig(char c){
        if(c>='A'&&c<='Z'){
            return true;
        }
        return false;
    }
}